<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<html>
  <head>
    <title>${appname}</title>
	<%@include file="../meta.jsp"%>
	<script src="${ctx}/js/common/jquery-1.6.2.min.js" type="text/javascript"></script>
	<script language="javascript" type="text/javascript" src="${ctx}/js/lhgdialog/lhgdialog.js"></script>
	<script src="${ctx}/js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
  </head>
  
  <body>
    <div class="Teg_body">
    	<%@include file="../header.jsp"%>
    	
    	<div class="Teg_content">
    		<div class="content_left i-pane" id="zhd_LeftPane" paneid="LeftPane">
    			<div class="m-second-menu-title">
	    			<span class="Head">我的任务</span>
    			</div>
    			<div class="m-second-menu-ct ZHDAlignleft">
	    			<div class="accordion-3-container">
	    				<ul class="accordion-3">
	    					<%@include file="task_left_menu.jsp"%>
	    				</ul>
	    			</div>
    			</div>
    			
    			<%@include file="../leftmenu.jsp"%>
    		</div>
    		<div class="content_right">
    			<div class="second_breadcrumb">
    				<span class="current_position">您的当前位置：<a href="${ctx}">首页</a>></span><span><a href="${ctx}/taskReturn/my.do" class="SkinObject">我的任务</a></span>
    			</div>
    			<div class="content_ct i-pane" id="zhd_ContentPane" style="margin-top: 5px;">
    				<s:form action="/taskReturn/my.do" method="post">
    				<s:hidden name="opt"/>
    				<div class="search_cond">
    					标题：<s:textfield key="title" title="请输入名称主题" cssClass="form-txtinput" maxlength="20" value="%{model.title}"/>
    					<input type="submit" value="查询"/>
    				</div>
    				<table width="100%" align="center" class="list-table" borderColor="#e3ecf6" bgColor="#e3ecf6" border="0" cellSpacing="1" cellPadding="0">
	    				<tr style="background: #f6fbff;" height="30">
	    					<td width="5%" align="center">序号</td>
	    					<td align="center">标题</td>
	    					<td width="10%" align="center">退回人</td>
	    					<td width="15%" align="center">退回时间</td>
	    					<td width="15%" align="center">状态</td>
	    					<td width="10%" align="center">操作</td>
	    				</tr>
	    				<c:forEach items="${page.result}" var="item" varStatus="status">
						<tr height="30"${status.index%2 == 0?'class="gray"':''}>
							<td align="center">${page.thisPageFirstElementNumber + status.index}</td>
							<td align="left"><a href="javascript:;" title="点击查看任务详情" onclick="showTask('${item.trid}')">${item.title}</a></td>
							<td align="center">${item.realname}</td>
							<td align="center">${item.thsjString}&nbsp;</td>
							<td align="center">
								<c:if test="${item.zt == 3}">高层处理</c:if>
								<c:if test="${item.zt == -2}">待处理</c:if>
								<c:if test="${item.zt == -1}">未处理</c:if>
								<c:if test="${item.zt == 0}">处理中</c:if>
								<c:if test="${item.zt == 1}">申诉成功</c:if>
								<c:if test="${item.zt == 2}">申诉失败</c:if>
							</td>
							<td align="center">
								<c:if test="${item.zt == 3}">
									<c:if test="${sessionScope.loginInfo.userid == item.ssr}">
									<a href="#" onclick="OpenCaseShow('${item.trid}','${item.taskid}')">查看</a>
									</c:if>
									<c:if test="${sessionScope.loginInfo.userid != item.ssr}">
									<a href="#" onclick="OpenCase('${item.trid}','${item.taskid}')">处理</a>
									</c:if>
								</c:if>
								<c:if test="${item.zt == -2}">
									<c:if test="${sessionScope.loginInfo.userid == item.ssr}">
									<a href="#" onclick="OpenCaseShow('${item.trid}','${item.taskid}')">查看</a>
									</c:if>
									<c:if test="${sessionScope.loginInfo.userid != item.ssr}">
									<a href="#" onclick="OpenCase('${item.trid}','${item.taskid}')">处理</a>
									</c:if>
								</c:if>
								<c:if test="${item.zt == -1}"><a href="#" onclick="OpenCase('${item.trid}','${item.taskid}')">申诉</a></c:if>
								<c:if test="${item.zt == 0}">
									<c:if test="${sessionScope.loginInfo.userid == item.ssr}">
									<a href="#" onclick="OpenCaseShow('${item.trid}','${item.taskid}')">查看</a>
									</c:if>
									<c:if test="${sessionScope.loginInfo.userid != item.ssr}">
									<a href="#" onclick="OpenCase('${item.trid}','${item.taskid}')">处理</a>
									</c:if>
								</c:if>
								<c:if test="${item.zt == 1}"><a href="#" onclick="OpenCaseShow('${item.trid}','${item.taskid}')">查看</a></c:if>
								<c:if test="${item.zt == 2}"><a href="#" onclick="OpenCaseShow('${item.trid}','${item.taskid}')">查看</a></c:if>
							</td>
						</tr>
						</c:forEach>
						
						<c:if test="${fn:length(page.result)==0}">
						<tr>
					    	<td colspan="7"><div class="note_red_in_div">${notFoundData }</div></td>
					    </tr>
					    </c:if>
    				</table>
    				<input type="hidden" name="pageNumber" value="${page.thisPageNumber}"/>
					<input type="hidden" name="pageSize" value="${page.pageSize}"/>
					<simpletable:homePageToolbar page="${page}"/>
    				</s:form>
    			</div>
    		</div>
    		<div class="clear"></div>
    	</div>
    	<%@include file="../bottom.jsp"%>
    </div>
  </body>
</html>
<script type="text/javascript">
function OpenCase(A,B){
  $.dialog({
  	id:'taskprocess', 
  	title:'任务退回申诉', 
  	content: 'url:${ctx}/taskReturn/getSs.do?trid='+A+'&taskid='+B+'&timestamp='+new Date().getTime(), 
  	max:true,min:false,
  	width:850, height:650});
}

function OpenCaseShow(A,B){
  $.dialog({
  	id:'taskprocess', 
  	title:'任务退回申诉', 
  	content: 'url:${ctx}/taskReturn/show.do?trid='+A+'&taskid='+B+'&timestamp='+new Date().getTime(), 
  	max:true,min:false,
  	width:850, height:650});
}

function showTask(A){
  $.dialog({
  	id:'taskprocess', 
  	title:'信息详情', 
  	content: 'url:${ctx}/task_show.do?taskid='+A+'&timestamp='+new Date().getTime(), 
  	max:true,min:false,
  	width:850, height:650});
}

</script>